package com.jingzhongbao.concurrent.lock;

import java.util.Random;

/**
 * User:jzb 
 * Date:2018/11/15 Time:12:49 
 * 生产鸡蛋类
 */
public class Produce {
	/**
     * 生产鸡蛋,耗时[1,5]秒(多线程共用)
     * @return
     */
	public static String produce() {
		try {
			Thread.sleep(new Random().nextInt(5) * 1000 + 1000);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "鸡蛋";
	}
}
